/*
 * @Author: hcluo
 * @Date: 2020-04-20 21:10:31
 * @LastEditors: hcluo
 * @LastEditTime: 2020-04-20 21:11:52
 * @Description: 政府项目
 */

const path = require('path');
const webpack = require('webpack');

module.exports = {
    entry: {
        library: [
            'react',
            'react-dom'
        ]
    },
    output: {
        filename: '[name].[chunkhash].dll.js',
        path: path.join(__dirname, 'library'),
        library: '[name]'
    },
    plugins: [
        new webpack.DllPlugin({
            name: '[name].[hash]',
            path: path.join(__dirname, 'library/[name].json')
        })
    ]
};